﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class admin_index : System.Web.UI.Page
{
   // NghiPhep n = new NghiPhep();
    //Common c = new Common();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack && Session["username"] != null)
        {
            lUsername.Text = Session["username"].ToString();
            Get_Info_NgayThang();
           

        }
        else Response.Redirect("../login.aspx");
    }
    protected void lnkLogout_Click(object sender, EventArgs e)
    {
        Session.Clear();
        Response.Redirect("../login.aspx");
    }
    protected void Get_Info_NgayThang()
    {
        string strNgay, strThu, strThang;

        strNgay = DateTime.Now.Day.ToString();

        strThu = DateTime.Now.DayOfWeek.ToString();// thu tu trong tuan nhu thu 2 , thu 3
        strThang = "Tháng " + DateTime.Now.Month.ToString();
        switch (strThu)
        {
            case "Monday": strThu = "Thứ 2"; break;
            case "Tuesday": strThu = "Thứ 3"; break;
            case "Wednesday": strThu = "Thứ 4"; break;
            case "Thursday": strThu = "Thứ 5"; break;
            case "Friday": strThu = "Thứ 6"; break;

        }
        switch (strNgay)
        {
            case "1": strNgay = "01"; break;
            case "2": strNgay = "02"; break;
            case "3": strNgay = "03"; break;
            case "4": strNgay = "04"; break;
            case "5": strNgay = "05"; break;
            case "6": strNgay = "06"; break;
            case "7": strNgay = "07"; break;
            case "8": strNgay = "08"; break;
            case "9": strNgay = "09"; break;
        }
        lNgay.Text = strNgay;
        lThang.Text = strThang;
        lThu.Text = strThu;

    }

    protected void BindGrid()
    { 
    
       // n.Nghi
    }
}
